package hibernate.billStream;

import java.util.Date;

import hibernate.administratorAccount.FrontDesk;
import hibernate.clientAccount.SingleClient;

public class PaymentInfo {
	
	private Bill bill;
	private CorporationEntity entity;
	private SingleClient client;
	private Date time;
	private Long id;
	private String note;
	private PaymentType type;
	private FrontDesk operator;
	
	public void setOperator(FrontDesk operator){
		this.operator=operator;
	}
	
	public FrontDesk getOperator(){
		return operator;
	}
	
	public static class PaymentType{
		
		private String name;
		public static final PaymentType CLIENT=new PaymentType("CLIENT"),
										 ONCORP=new PaymentType("CORPORATION"),
										 ONSIGN=new PaymentType("SIGNBILL"); 
		
		private PaymentType(String name){
			this.name=name;
		}
		
		public String toString(){
			return name;
		}
	}
	
	public String getNote(){
		return this.note == null ? "" : note;
	}
	
	public void setNote(String note){
		this.note=note;
	}
	
	public String getType(){
		return type == null ? "" : type.toString();
	}
	
	public void setType(String type){
		if(type.equals(PaymentType.CLIENT.toString()))
			this.type=PaymentType.CLIENT;
		else if(type.equals(PaymentType.ONCORP.toString()))
			this.type=PaymentType.ONCORP;
		else this.type=PaymentType.ONSIGN;
	}
	
	public PaymentType getConcreteType(){
		return type;
	}
	
	public void setId(Long id){
		this.id=id;
	}
	
	public Long getId(){
		return id;
	}
	
	public void setTime(Date date){
		this.time=date;
	}
	
	public Date getTime(){
		return time;
	}
	
	public SingleClient getClient(){
		return client;
	}
	
	public void setClient(SingleClient client){
		this.client=client;
	}
	
	public void setCorp(CorporationEntity entity){
		this.entity=entity;
	}
	
	public CorporationEntity getCorp(){
		return entity;
	}
	
	public Bill getBill(){
		return bill;
	}
	
	public void setBill(Bill bill){
		this.bill=bill;
	}
}
